﻿namespace CSharpPro
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("100以内的所有质数：");
            
            for (int num = 2; num <= 100; num++)
            {
                bool isPrime = true; 
                
               
                for (int i = 2; i <= Math.Sqrt(num); i++)
                {

                    if (num % i == 0)
                    {
                        isPrime = false;
                        break; 
                    }
                }
                
                if (isPrime)
                {
                    Console.Write(num + " ");
                }
            }
        }
    }
}

